<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>USART Interface</title>
<title>CMSIS-Driver: USART Interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-Driver
   &#160;<span id="projectnumber">Version 2.7.1</span>
   </div>
   <div id="projectbrief">Peripheral Interface for Middleware and Application Code</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__usart__interface__gr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Content</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">USART Interface</div>  </div>
</div><!--header-->
<div class="contents">

<p>Driver API for Universal Synchronous Asynchronous Receiver/Transmitter (Driver_USART.h)  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Content</h2></td></tr>
<tr class="memitem:group__usart__execution__status"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__execution__status.html">Status Error Codes</a></td></tr>
<tr class="memdesc:group__usart__execution__status"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negative values indicate errors (USART has specific codes in addition to common <a class="el" href="group__execution__status.html">Status Error Codes</a>). <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__USART__events"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__USART__events.html">USART Events</a></td></tr>
<tr class="memdesc:group__USART__events"><td class="mdescLeft">&#160;</td><td class="mdescRight">The USART driver generates call back events that are notified via the function <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__USART__control"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__USART__control.html">USART Control Codes</a></td></tr>
<tr class="memdesc:group__USART__control"><td class="mdescLeft">&#160;</td><td class="mdescRight">Many parameters of the USART driver are configured using the <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> function. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structARM__DRIVER__USART"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a></td></tr>
<tr class="memdesc:structARM__DRIVER__USART"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access structure of the USART Driver.  <a href="group__usart__interface__gr.html#structARM__DRIVER__USART">More...</a><br/></td></tr>
<tr class="separator:structARM__DRIVER__USART"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__USART__CAPABILITIES"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a></td></tr>
<tr class="memdesc:structARM__USART__CAPABILITIES"><td class="mdescLeft">&#160;</td><td class="mdescRight">USART Device Driver Capabilities.  <a href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">More...</a><br/></td></tr>
<tr class="separator:structARM__USART__CAPABILITIES"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__USART__STATUS"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a></td></tr>
<tr class="memdesc:structARM__USART__STATUS"><td class="mdescLeft">&#160;</td><td class="mdescRight">USART Status.  <a href="group__usart__interface__gr.html#structARM__USART__STATUS">More...</a><br/></td></tr>
<tr class="separator:structARM__USART__STATUS"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__USART__MODEM__STATUS"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a></td></tr>
<tr class="memdesc:structARM__USART__MODEM__STATUS"><td class="mdescLeft">&#160;</td><td class="mdescRight">USART Modem Status.  <a href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">More...</a><br/></td></tr>
<tr class="separator:structARM__USART__MODEM__STATUS"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaa578c3829eea207e9e48df6cb6f038a1"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gaa578c3829eea207e9e48df6cb6f038a1">ARM_USART_SignalEvent_t</a> )(uint32_t event)</td></tr>
<tr class="memdesc:gaa578c3829eea207e9e48df6cb6f038a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> : Signal USART Event.  <a href="#gaa578c3829eea207e9e48df6cb6f038a1">More...</a><br/></td></tr>
<tr class="separator:gaa578c3829eea207e9e48df6cb6f038a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga7b89d709f048b6a956aa211f63e75f6f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a> { <br/>
&#160;&#160;<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6fab4d04e682d04f70c6aeba130656d3ec6">ARM_USART_RTS_CLEAR</a>, 
<br/>
&#160;&#160;<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6fa7f9d445e6e56642c4c4251a00bfa7434">ARM_USART_RTS_SET</a>, 
<br/>
&#160;&#160;<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6fa3ad44ce9f16c136ccad45c09ec65cb4c">ARM_USART_DTR_CLEAR</a>, 
<br/>
&#160;&#160;<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6fab938a21e1b59a2b92424e2521b9469d4">ARM_USART_DTR_SET</a>
<br/>
 }</td></tr>
<tr class="memdesc:ga7b89d709f048b6a956aa211f63e75f6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">USART Modem Control.  <a href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">More...</a><br/></td></tr>
<tr class="separator:ga7b89d709f048b6a956aa211f63e75f6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabca6151cef47565832decaf484781b61"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gabca6151cef47565832decaf484781b61">ARM_USART_GetVersion</a> (void)</td></tr>
<tr class="memdesc:gabca6151cef47565832decaf484781b61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver version.  <a href="#gabca6151cef47565832decaf484781b61">More...</a><br/></td></tr>
<tr class="separator:gabca6151cef47565832decaf484781b61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad2d3ace1fe7627bb72945efefaeddf0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gad2d3ace1fe7627bb72945efefaeddf0a">ARM_USART_GetCapabilities</a> (void)</td></tr>
<tr class="memdesc:gad2d3ace1fe7627bb72945efefaeddf0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver capabilities.  <a href="#gad2d3ace1fe7627bb72945efefaeddf0a">More...</a><br/></td></tr>
<tr class="separator:gad2d3ace1fe7627bb72945efefaeddf0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga51f06805e9a6197c553fa9513ac7b9d6"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga51f06805e9a6197c553fa9513ac7b9d6">ARM_USART_Initialize</a> (<a class="el" href="group__usart__interface__gr.html#gaa578c3829eea207e9e48df6cb6f038a1">ARM_USART_SignalEvent_t</a> cb_event)</td></tr>
<tr class="memdesc:ga51f06805e9a6197c553fa9513ac7b9d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize USART Interface.  <a href="#ga51f06805e9a6197c553fa9513ac7b9d6">More...</a><br/></td></tr>
<tr class="separator:ga51f06805e9a6197c553fa9513ac7b9d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga96f31f07a6721cf75de2a7a0ab723d26"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga96f31f07a6721cf75de2a7a0ab723d26">ARM_USART_Uninitialize</a> (void)</td></tr>
<tr class="memdesc:ga96f31f07a6721cf75de2a7a0ab723d26"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize USART Interface.  <a href="#ga96f31f07a6721cf75de2a7a0ab723d26">More...</a><br/></td></tr>
<tr class="separator:ga96f31f07a6721cf75de2a7a0ab723d26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9bad012b28d544f3eeeea9c2f71a4086"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga9bad012b28d544f3eeeea9c2f71a4086">ARM_USART_PowerControl</a> (<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:ga9bad012b28d544f3eeeea9c2f71a4086"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control USART Interface Power.  <a href="#ga9bad012b28d544f3eeeea9c2f71a4086">More...</a><br/></td></tr>
<tr class="separator:ga9bad012b28d544f3eeeea9c2f71a4086"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5cf758b0b9d03dca68846962f73c0b08"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a> (const void *data, uint32_t num)</td></tr>
<tr class="memdesc:ga5cf758b0b9d03dca68846962f73c0b08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start sending data to USART transmitter.  <a href="#ga5cf758b0b9d03dca68846962f73c0b08">More...</a><br/></td></tr>
<tr class="separator:ga5cf758b0b9d03dca68846962f73c0b08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae9efabdabb5aaa17bce83339f8a58803"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a> (void *data, uint32_t num)</td></tr>
<tr class="memdesc:gae9efabdabb5aaa17bce83339f8a58803"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start receiving data from USART receiver.  <a href="#gae9efabdabb5aaa17bce83339f8a58803">More...</a><br/></td></tr>
<tr class="separator:gae9efabdabb5aaa17bce83339f8a58803"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga878899928d34a818edd3e97d67b65c2a"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> (const void *data_out, void *data_in, uint32_t num)</td></tr>
<tr class="memdesc:ga878899928d34a818edd3e97d67b65c2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start sending/receiving data to/from USART transmitter/receiver.  <a href="#ga878899928d34a818edd3e97d67b65c2a">More...</a><br/></td></tr>
<tr class="separator:ga878899928d34a818edd3e97d67b65c2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb355584bcdf4ebd36f11d945800fa03"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gacb355584bcdf4ebd36f11d945800fa03">ARM_USART_GetTxCount</a> (void)</td></tr>
<tr class="memdesc:gacb355584bcdf4ebd36f11d945800fa03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transmitted data count.  <a href="#gacb355584bcdf4ebd36f11d945800fa03">More...</a><br/></td></tr>
<tr class="separator:gacb355584bcdf4ebd36f11d945800fa03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a8799aeeba1363a9e5d22bada715a29"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga1a8799aeeba1363a9e5d22bada715a29">ARM_USART_GetRxCount</a> (void)</td></tr>
<tr class="memdesc:ga1a8799aeeba1363a9e5d22bada715a29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get received data count.  <a href="#ga1a8799aeeba1363a9e5d22bada715a29">More...</a><br/></td></tr>
<tr class="separator:ga1a8799aeeba1363a9e5d22bada715a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8ffdde2123b5412de3005c456da677d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> (uint32_t control, uint32_t arg)</td></tr>
<tr class="memdesc:gad8ffdde2123b5412de3005c456da677d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control USART Interface.  <a href="#gad8ffdde2123b5412de3005c456da677d">More...</a><br/></td></tr>
<tr class="separator:gad8ffdde2123b5412de3005c456da677d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e8fdd54294b587438b2b72f4dbde004"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> (void)</td></tr>
<tr class="memdesc:ga1e8fdd54294b587438b2b72f4dbde004"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get USART status.  <a href="#ga1e8fdd54294b587438b2b72f4dbde004">More...</a><br/></td></tr>
<tr class="separator:ga1e8fdd54294b587438b2b72f4dbde004"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8eb0eb1d1c24fc725584ab93214cfc7"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gad8eb0eb1d1c24fc725584ab93214cfc7">ARM_USART_SetModemControl</a> (<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a> control)</td></tr>
<tr class="memdesc:gad8eb0eb1d1c24fc725584ab93214cfc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set USART Modem Control line state.  <a href="#gad8eb0eb1d1c24fc725584ab93214cfc7">More...</a><br/></td></tr>
<tr class="separator:gad8eb0eb1d1c24fc725584ab93214cfc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga198af0d6a7c85b7c0b96f3d9db8c34e0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ga198af0d6a7c85b7c0b96f3d9db8c34e0">ARM_USART_GetModemStatus</a> (void)</td></tr>
<tr class="memdesc:ga198af0d6a7c85b7c0b96f3d9db8c34e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get USART Modem Status lines state.  <a href="#ga198af0d6a7c85b7c0b96f3d9db8c34e0">More...</a><br/></td></tr>
<tr class="separator:ga198af0d6a7c85b7c0b96f3d9db8c34e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad796cd023f8f6300a6caadcc39d43cbf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> (uint32_t event)</td></tr>
<tr class="memdesc:gad796cd023f8f6300a6caadcc39d43cbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal USART Events.  <a href="#gad796cd023f8f6300a6caadcc39d43cbf">More...</a><br/></td></tr>
<tr class="separator:gad796cd023f8f6300a6caadcc39d43cbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Driver API for Universal Synchronous Asynchronous Receiver/Transmitter (Driver_USART.h) </p>
<p>The <b>Universal Synchronous Asynchronous Receiver/Transmitter</b> (USART) implements a synchronous and asynchronous serial bus for exchanging data. When only asynchronous mode is supported it is called Universal Asynchronous Receiver/Transmitter (UART). Almost all microcontrollers have a serial interface (UART/USART peripheral). A UART is a simple device to send data to a PC via a terminal emulation program (Hyperterm, TeraTerm) or to another microcontroller. A UART takes bytes of data and transmits the individual bits in a sequential mode. At the destination, a second UART reassembles the bits into complete bytes. Each UART contains a shift register for converting between serial and parallel transmission forms. Wikipedia offers more information about the <a href="http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter" target="_blank"><b>Universal asynchronous receiver/transmitter</b></a>.</p>
<p><b>USART API</b></p>
<p>The following header files define the Application Programming Interface (API) for the USART interface:</p>
<ul>
<li><b>Driver_USART.h</b> : Driver API for Universal Synchronous Asynchronous Receiver/Transmitter</li>
</ul>
<p>The driver implementation is a typical part of the Device Family Pack (DFP) that supports the peripherals of the microcontroller family.</p>
<p><b>Driver Functions</b></p>
<p>The driver functions are published in the access struct as explained in <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a></p>
<ul>
<li><a class="el" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> : access struct for USART driver functions</li>
</ul>
<p><b>Example Code</b></p>
<p>The following example code shows the usage of the USART interface for asynchronous communication.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="Driver__USART_8h.html">Driver_USART.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;cmsis_os.h&quot;</span>                   <span class="comment">/* ARM::CMSIS:RTOS:Keil RTX */</span></div>
<div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> myUART_Thread(<span class="keywordtype">void</span> <span class="keyword">const</span> *argument);</div>
<div class="line">osThreadId tid_myUART_Thread;</div>
<div class="line"> </div>
<div class="line"><span class="comment">/* USART Driver */</span></div>
<div class="line"><span class="keyword">extern</span> <a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> Driver_USART3;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> myUSART_callback(uint32_t event)</div>
<div class="line">{</div>
<div class="line">  uint32_t mask;</div>
<div class="line"></div>
<div class="line">  mask = <a class="code" href="group__USART__events.html#ga08b165fd8525e44e3ce42ed6183cd30a">ARM_USART_EVENT_RECEIVE_COMPLETE</a>  |</div>
<div class="line">         <a class="code" href="group__USART__events.html#ga0599793e6aa531d56ff9f81ff12605d7">ARM_USART_EVENT_TRANSFER_COMPLETE</a> |</div>
<div class="line">         <a class="code" href="group__USART__events.html#gaae1c626192b16ccace93f3546e7884bf">ARM_USART_EVENT_SEND_COMPLETE</a>     |</div>
<div class="line">         <a class="code" href="group__USART__events.html#ga12872a3b04343f97d9535b5b0d37286d">ARM_USART_EVENT_TX_COMPLETE</a>       ;</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">if</span> (event &amp; mask) {</div>
<div class="line">    <span class="comment">/* Success: Wakeup Thread */</span></div>
<div class="line">    osSignalSet(tid_myUART_Thread, 0x01);</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">if</span> (event &amp; <a class="code" href="group__USART__events.html#ga66ee2256571450a3fc3c530344ea9bd7">ARM_USART_EVENT_RX_TIMEOUT</a>) {</div>
<div class="line">    __breakpoint(0);  <span class="comment">/* Error: Call debugger or replace with custom error handling */</span></div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">if</span> (event &amp; (<a class="code" href="group__USART__events.html#ga43a0869daf83abb3fea96926a97047ad">ARM_USART_EVENT_RX_OVERFLOW</a> | <a class="code" href="group__USART__events.html#gae57b9977bd338bf8bef86978843fa443">ARM_USART_EVENT_TX_UNDERFLOW</a>)) {</div>
<div class="line">    __breakpoint(0);  <span class="comment">/* Error: Call debugger or replace with custom error handling */</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"> </div>
<div class="line"><span class="comment">/* CMSIS-RTOS Thread - UART command thread */</span></div>
<div class="line"><span class="keywordtype">void</span> myUART_Thread(<span class="keyword">const</span> <span class="keywordtype">void</span>* args)</div>
<div class="line">{</div>
<div class="line">    <span class="keyword">static</span> <a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> * USARTdrv = &amp;Driver_USART3;</div>
<div class="line">    <a class="code" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>     version;</div>
<div class="line">    <a class="code" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a> drv_capabilities;</div>
<div class="line">    <span class="keywordtype">char</span>                   cmd;</div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">  #ifdef DEBUG</span></div>
<div class="line"><span class="preprocessor"></span>    version = USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a8834b281da48583845c044a81566c1b3">GetVersion</a>();</div>
<div class="line">    <span class="keywordflow">if</span> (version.<a class="code" href="group__common__drv__gr.html#ad180da20fbde1d3dafc074af87c19540">api</a> &lt; 0x200)   <span class="comment">/* requires at minimum API version 2.00 or higher */</span></div>
<div class="line">    {                          <span class="comment">/* error handling */</span></div>
<div class="line">        <span class="keywordflow">return</span>;</div>
<div class="line">    }</div>
<div class="line">    drv_capabilities = USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a9cec078ea816ece7b2d989f35caadb12">GetCapabilities</a>();</div>
<div class="line">    <span class="keywordflow">if</span> (drv_capabilities.<a class="code" href="group__usart__interface__gr.html#a0190aabe8d8f59176be8d693f8874fb3">event_tx_complete</a> == 0)</div>
<div class="line">    {                          <span class="comment">/* error handling */</span></div>
<div class="line">        <span class="keywordflow">return</span>;</div>
<div class="line">    }</div>
<div class="line"><span class="preprocessor">  #endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line">    <span class="comment">/*Initialize the USART driver */</span></div>
<div class="line">    USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a1a68601c09df8d37f3500ad373333962">Initialize</a>(myUSART_callback);</div>
<div class="line">    <span class="comment">/*Power up the USART peripheral */</span></div>
<div class="line">    USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#aba8f1c8019af95ffe19c32403e3240ef">PowerControl</a>(<a class="code" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a>);</div>
<div class="line">    <span class="comment">/*Configure the USART to 4800 Bits/sec */</span></div>
<div class="line">    USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__usart__mode__control.html#gad85039731478c924d3b418ec00768388">ARM_USART_MODE_ASYNCHRONOUS</a> |</div>
<div class="line">                      <a class="code" href="group__usart__data__bits.html#gadc5e8d17b5c69cd7f9135b849c2a4586">ARM_USART_DATA_BITS_8</a> |</div>
<div class="line">                      <a class="code" href="group__usart__parity__bit.html#ga141a64650f99a1f642c3b3b6ced0eb8d">ARM_USART_PARITY_NONE</a> |</div>
<div class="line">                      <a class="code" href="group__usart__stop__bits.html#ga45f51a51e654b4753a538ed33f0d7d78">ARM_USART_STOP_BITS_1</a> |</div>
<div class="line">                      <a class="code" href="group__usart__flow__control.html#gad04aa3fe4ea4b7363aee4bdca2ed3764">ARM_USART_FLOW_CONTROL_NONE</a>, 4800);</div>
<div class="line">     </div>
<div class="line">    <span class="comment">/* Enable Receiver and Transmitter lines */</span></div>
<div class="line">    USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a> (<a class="code" href="group__usart__misc__control.html#gad96ea1a80c97f968fbc0ae4c20e7fa6a">ARM_USART_CONTROL_TX</a>, 1);</div>
<div class="line">    USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a> (<a class="code" href="group__usart__misc__control.html#gad52c08553ae203d4f7741404589b8169">ARM_USART_CONTROL_RX</a>, 1);</div>
<div class="line"> </div>
<div class="line">    USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a44eedddf4428cf4b98883b6c27d31922">Send</a>(<span class="stringliteral">&quot;\nPress Enter to receive a message&quot;</span>, 34);</div>
<div class="line">    osSignalWait(0x01, osWaitForever);</div>
<div class="line">     </div>
<div class="line">    <span class="keywordflow">while</span> (1)</div>
<div class="line">    {</div>
<div class="line">        USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#adb9224a35fe16c92eb0dd103638e4cf3">Receive</a>(&amp;cmd, 1);          <span class="comment">/* Get byte from UART */</span></div>
<div class="line">        osSignalWait(0x01, osWaitForever);</div>
<div class="line">        <span class="keywordflow">if</span> (cmd == 13)                       <span class="comment">/* CR, send greeting  */</span></div>
<div class="line">        {</div>
<div class="line">          USARTdrv-&gt;<a class="code" href="group__usart__interface__gr.html#a44eedddf4428cf4b98883b6c27d31922">Send</a>(<span class="stringliteral">&quot;\nHello World!&quot;</span>, 12);</div>
<div class="line">          osSignalWait(0x01, osWaitForever);</div>
<div class="line">        }</div>
<div class="line"> </div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment --> <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structARM__DRIVER__USART" id="structARM__DRIVER__USART"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_DRIVER_USART</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Access structure of the USART Driver. </p>
<p>The functions of the USART driver are accessed by function pointers exposed by this structure. Refer to <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a> for overview information.</p>
<p>Each instance of an USART interface provides such an access structure. The instance is identified by a postfix number in the symbol name of the access structure, for example:</p>
<ul>
<li><b>Driver_USART0</b> is the name of the access struct of the first instance (no. 0).</li>
<li><b>Driver_USART1</b> is the name of the access struct of the second instance (no. 1).</li>
</ul>
<p>A middleware configuration setting allows connecting the middleware to a specific driver instance <b>Driver_USART<em>n</em></b>. The default is <span class="XML-Token">0</span>, which connects a middleware to the first instance of a driver. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a8834b281da48583845c044a81566c1b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a8834b281da48583845c044a81566c1b3">GetVersion</a> )(void)</td></tr>
<tr class="memdesc:a8834b281da48583845c044a81566c1b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gabca6151cef47565832decaf484781b61">ARM_USART_GetVersion</a> : Get driver version.  <a href="#a8834b281da48583845c044a81566c1b3">More...</a><br/></td></tr>
<tr class="separator:a8834b281da48583845c044a81566c1b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cec078ea816ece7b2d989f35caadb12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a9cec078ea816ece7b2d989f35caadb12">GetCapabilities</a> )(void)</td></tr>
<tr class="memdesc:a9cec078ea816ece7b2d989f35caadb12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gad2d3ace1fe7627bb72945efefaeddf0a">ARM_USART_GetCapabilities</a> : Get driver capabilities.  <a href="#a9cec078ea816ece7b2d989f35caadb12">More...</a><br/></td></tr>
<tr class="separator:a9cec078ea816ece7b2d989f35caadb12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a68601c09df8d37f3500ad373333962"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a1a68601c09df8d37f3500ad373333962">Initialize</a> )(<a class="el" href="group__usart__interface__gr.html#gaa578c3829eea207e9e48df6cb6f038a1">ARM_USART_SignalEvent_t</a> cb_event)</td></tr>
<tr class="memdesc:a1a68601c09df8d37f3500ad373333962"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga51f06805e9a6197c553fa9513ac7b9d6">ARM_USART_Initialize</a> : Initialize USART Interface.  <a href="#a1a68601c09df8d37f3500ad373333962">More...</a><br/></td></tr>
<tr class="separator:a1a68601c09df8d37f3500ad373333962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcf20681a1402869ecb5c6447fada17b"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#adcf20681a1402869ecb5c6447fada17b">Uninitialize</a> )(void)</td></tr>
<tr class="memdesc:adcf20681a1402869ecb5c6447fada17b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga96f31f07a6721cf75de2a7a0ab723d26">ARM_USART_Uninitialize</a> : De-initialize USART Interface.  <a href="#adcf20681a1402869ecb5c6447fada17b">More...</a><br/></td></tr>
<tr class="separator:adcf20681a1402869ecb5c6447fada17b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba8f1c8019af95ffe19c32403e3240ef"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#aba8f1c8019af95ffe19c32403e3240ef">PowerControl</a> )(<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:aba8f1c8019af95ffe19c32403e3240ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga9bad012b28d544f3eeeea9c2f71a4086">ARM_USART_PowerControl</a> : Control USART Interface Power.  <a href="#aba8f1c8019af95ffe19c32403e3240ef">More...</a><br/></td></tr>
<tr class="separator:aba8f1c8019af95ffe19c32403e3240ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44eedddf4428cf4b98883b6c27d31922"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a44eedddf4428cf4b98883b6c27d31922">Send</a> )(const void *data, uint32_t num)</td></tr>
<tr class="memdesc:a44eedddf4428cf4b98883b6c27d31922"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a> : Start sending data to USART transmitter.  <a href="#a44eedddf4428cf4b98883b6c27d31922">More...</a><br/></td></tr>
<tr class="separator:a44eedddf4428cf4b98883b6c27d31922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb9224a35fe16c92eb0dd103638e4cf3"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#adb9224a35fe16c92eb0dd103638e4cf3">Receive</a> )(void *data, uint32_t num)</td></tr>
<tr class="memdesc:adb9224a35fe16c92eb0dd103638e4cf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a> : Start receiving data from USART receiver.  <a href="#adb9224a35fe16c92eb0dd103638e4cf3">More...</a><br/></td></tr>
<tr class="separator:adb9224a35fe16c92eb0dd103638e4cf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad88b63ed74c03ba06b0599ab06ad4cf7"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#ad88b63ed74c03ba06b0599ab06ad4cf7">Transfer</a> )(const void *data_out, void *data_in, uint32_t num)</td></tr>
<tr class="memdesc:ad88b63ed74c03ba06b0599ab06ad4cf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> : Start sending/receiving data to/from USART.  <a href="#ad88b63ed74c03ba06b0599ab06ad4cf7">More...</a><br/></td></tr>
<tr class="separator:ad88b63ed74c03ba06b0599ab06ad4cf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b28b2c21016702f50c28655653099df"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a0b28b2c21016702f50c28655653099df">GetTxCount</a> )(void)</td></tr>
<tr class="memdesc:a0b28b2c21016702f50c28655653099df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gacb355584bcdf4ebd36f11d945800fa03">ARM_USART_GetTxCount</a> : Get transmitted data count.  <a href="#a0b28b2c21016702f50c28655653099df">More...</a><br/></td></tr>
<tr class="separator:a0b28b2c21016702f50c28655653099df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a758c7822edf6ac18f82eb33c9dc09d71"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a758c7822edf6ac18f82eb33c9dc09d71">GetRxCount</a> )(void)</td></tr>
<tr class="memdesc:a758c7822edf6ac18f82eb33c9dc09d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga1a8799aeeba1363a9e5d22bada715a29">ARM_USART_GetRxCount</a> : Get received data count.  <a href="#a758c7822edf6ac18f82eb33c9dc09d71">More...</a><br/></td></tr>
<tr class="separator:a758c7822edf6ac18f82eb33c9dc09d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e0f47a92f626a971c5197fca6545505"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a> )(uint32_t control, uint32_t arg)</td></tr>
<tr class="memdesc:a6e0f47a92f626a971c5197fca6545505"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> : Control USART Interface.  <a href="#a6e0f47a92f626a971c5197fca6545505">More...</a><br/></td></tr>
<tr class="separator:a6e0f47a92f626a971c5197fca6545505"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a055ad4095356a022886828009a980316"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a055ad4095356a022886828009a980316">GetStatus</a> )(void)</td></tr>
<tr class="memdesc:a055ad4095356a022886828009a980316"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> : Get USART status.  <a href="#a055ad4095356a022886828009a980316">More...</a><br/></td></tr>
<tr class="separator:a055ad4095356a022886828009a980316"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6703d4078818df27ab9f8a7a8ad7b7b"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#af6703d4078818df27ab9f8a7a8ad7b7b">SetModemControl</a> )(<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a> control)</td></tr>
<tr class="memdesc:af6703d4078818df27ab9f8a7a8ad7b7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#gad8eb0eb1d1c24fc725584ab93214cfc7">ARM_USART_SetModemControl</a> : Set USART Modem Control line state.  <a href="#af6703d4078818df27ab9f8a7a8ad7b7b">More...</a><br/></td></tr>
<tr class="separator:af6703d4078818df27ab9f8a7a8ad7b7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a517a7a98a444126734782beb4951a9db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usart__interface__gr.html#a517a7a98a444126734782beb4951a9db">GetModemStatus</a> )(void)</td></tr>
<tr class="memdesc:a517a7a98a444126734782beb4951a9db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usart__interface__gr.html#ga198af0d6a7c85b7c0b96f3d9db8c34e0">ARM_USART_GetModemStatus</a> : Get USART Modem Status lines state.  <a href="#a517a7a98a444126734782beb4951a9db">More...</a><br/></td></tr>
<tr class="separator:a517a7a98a444126734782beb4951a9db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a8834b281da48583845c044a81566c1b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>(* GetVersion)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gabca6151cef47565832decaf484781b61">ARM_USART_GetVersion</a> : Get driver version. </p>

</div>
</div>
<a class="anchor" id="a9cec078ea816ece7b2d989f35caadb12"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a>(* GetCapabilities)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gad2d3ace1fe7627bb72945efefaeddf0a">ARM_USART_GetCapabilities</a> : Get driver capabilities. </p>

</div>
</div>
<a class="anchor" id="a1a68601c09df8d37f3500ad373333962"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Initialize)(<a class="el" href="group__usart__interface__gr.html#gaa578c3829eea207e9e48df6cb6f038a1">ARM_USART_SignalEvent_t</a> cb_event)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga51f06805e9a6197c553fa9513ac7b9d6">ARM_USART_Initialize</a> : Initialize USART Interface. </p>

</div>
</div>
<a class="anchor" id="adcf20681a1402869ecb5c6447fada17b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Uninitialize)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga96f31f07a6721cf75de2a7a0ab723d26">ARM_USART_Uninitialize</a> : De-initialize USART Interface. </p>

</div>
</div>
<a class="anchor" id="aba8f1c8019af95ffe19c32403e3240ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* PowerControl)(<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga9bad012b28d544f3eeeea9c2f71a4086">ARM_USART_PowerControl</a> : Control USART Interface Power. </p>

</div>
</div>
<a class="anchor" id="a44eedddf4428cf4b98883b6c27d31922"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Send)(const void *data, uint32_t num)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a> : Start sending data to USART transmitter. </p>

</div>
</div>
<a class="anchor" id="adb9224a35fe16c92eb0dd103638e4cf3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Receive)(void *data, uint32_t num)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a> : Start receiving data from USART receiver. </p>

</div>
</div>
<a class="anchor" id="ad88b63ed74c03ba06b0599ab06ad4cf7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Transfer)(const void *data_out, void *data_in, uint32_t num)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> : Start sending/receiving data to/from USART. </p>

</div>
</div>
<a class="anchor" id="a0b28b2c21016702f50c28655653099df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* GetTxCount)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gacb355584bcdf4ebd36f11d945800fa03">ARM_USART_GetTxCount</a> : Get transmitted data count. </p>

</div>
</div>
<a class="anchor" id="a758c7822edf6ac18f82eb33c9dc09d71"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* GetRxCount)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga1a8799aeeba1363a9e5d22bada715a29">ARM_USART_GetRxCount</a> : Get received data count. </p>

</div>
</div>
<a class="anchor" id="a6e0f47a92f626a971c5197fca6545505"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Control)(uint32_t control, uint32_t arg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> : Control USART Interface. </p>

</div>
</div>
<a class="anchor" id="a055ad4095356a022886828009a980316"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>(* GetStatus)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> : Get USART status. </p>

</div>
</div>
<a class="anchor" id="af6703d4078818df27ab9f8a7a8ad7b7b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* SetModemControl)(<a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a> control)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gad8eb0eb1d1c24fc725584ab93214cfc7">ARM_USART_SetModemControl</a> : Set USART Modem Control line state. </p>

</div>
</div>
<a class="anchor" id="a517a7a98a444126734782beb4951a9db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>(* GetModemStatus)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#ga198af0d6a7c85b7c0b96f3d9db8c34e0">ARM_USART_GetModemStatus</a> : Get USART Modem Status lines state. </p>

</div>
</div>

</div>
</div>
<a name="structARM__USART__CAPABILITIES" id="structARM__USART__CAPABILITIES"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_USART_CAPABILITIES</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>USART Device Driver Capabilities. </p>
<p>An USART driver can be implemented with different capabilities. The data fields of this structure encode the capabilities implemented by this driver.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__usart__interface__gr.html#gad2d3ace1fe7627bb72945efefaeddf0a">ARM_USART_GetCapabilities</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a75ba2507ea29601a309393e794f4413d"></a>uint32_t</td>
<td class="fieldname">
asynchronous: 1</td>
<td class="fielddoc">
supports UART (Asynchronous) mode </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="afb385bfd9fb2d714bb58aa7d8d9d7d51"></a>uint32_t</td>
<td class="fieldname">
synchronous_master: 1</td>
<td class="fielddoc">
supports Synchronous Master mode </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a37dcd87df8762e2bc9af9fea368b1537"></a>uint32_t</td>
<td class="fieldname">
synchronous_slave: 1</td>
<td class="fielddoc">
supports Synchronous Slave mode </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ad1928b61021dd9ff689a3ccf9b8966a8"></a>uint32_t</td>
<td class="fieldname">
single_wire: 1</td>
<td class="fielddoc">
supports UART Single-wire mode </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a9a72c5f0209a9ccf840fc196e9a9dffa"></a>uint32_t</td>
<td class="fieldname">
irda: 1</td>
<td class="fielddoc">
supports UART IrDA mode </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa78e1ee1726d1db2cfa83fd7b5acc8bd"></a>uint32_t</td>
<td class="fieldname">
smart_card: 1</td>
<td class="fielddoc">
supports UART Smart Card mode </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a7b3c14ea1b5e9ba0a37ebc05fcfd51a6"></a>uint32_t</td>
<td class="fieldname">
smart_card_clock: 1</td>
<td class="fielddoc">
Smart Card Clock generator available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a1d55dd339a08293018608775fc8b4859"></a>uint32_t</td>
<td class="fieldname">
flow_control_rts: 1</td>
<td class="fielddoc">
RTS Flow Control available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a287da15773bb24a301cbfd806975e1e9"></a>uint32_t</td>
<td class="fieldname">
flow_control_cts: 1</td>
<td class="fielddoc">
CTS Flow Control available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a0190aabe8d8f59176be8d693f8874fb3"></a>uint32_t</td>
<td class="fieldname">
event_tx_complete: 1</td>
<td class="fielddoc">
Transmit completed event: <a class="el" href="group__USART__events.html#ga12872a3b04343f97d9535b5b0d37286d">ARM_USART_EVENT_TX_COMPLETE</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="afe469796cfca4ea61bd6181afb4916be"></a>uint32_t</td>
<td class="fieldname">
event_rx_timeout: 1</td>
<td class="fielddoc">
Signal receive character timeout event: <a class="el" href="group__USART__events.html#ga66ee2256571450a3fc3c530344ea9bd7">ARM_USART_EVENT_RX_TIMEOUT</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="afad044722f459552e9f0f602983659e9"></a>uint32_t</td>
<td class="fieldname">
rts: 1</td>
<td class="fielddoc">
RTS Line: 0=not available, 1=available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a0a4ccfb729b3a40a5fd611021268c262"></a>uint32_t</td>
<td class="fieldname">
cts: 1</td>
<td class="fielddoc">
CTS Line: 0=not available, 1=available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa3cc092c82fdc3e5e6646460be6ae9fd"></a>uint32_t</td>
<td class="fieldname">
dtr: 1</td>
<td class="fielddoc">
DTR Line: 0=not available, 1=available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a437895b17519a16f920ae07461dd67d2"></a>uint32_t</td>
<td class="fieldname">
dsr: 1</td>
<td class="fielddoc">
DSR Line: 0=not available, 1=available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa56a9ad6e266df78157f0e04feb4b78c"></a>uint32_t</td>
<td class="fieldname">
dcd: 1</td>
<td class="fielddoc">
DCD Line: 0=not available, 1=available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa6cf03b82235bedc0acf00acb46130fb"></a>uint32_t</td>
<td class="fieldname">
ri: 1</td>
<td class="fielddoc">
RI Line: 0=not available, 1=available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a4ebe5ddec8d99a63843f2a3c70ac85f9"></a>uint32_t</td>
<td class="fieldname">
event_cts: 1</td>
<td class="fielddoc">
Signal CTS change event: <a class="el" href="group__USART__events.html#ga4cd807ca131bdcb1a7eb4f223fa70476">ARM_USART_EVENT_CTS</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aefdb61f16498d650b5a7f5f9b62779df"></a>uint32_t</td>
<td class="fieldname">
event_dsr: 1</td>
<td class="fielddoc">
Signal DSR change event: <a class="el" href="group__USART__events.html#ga5afef591c2e8dd9bc4332b7bc8d96309">ARM_USART_EVENT_DSR</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a7c1dd043d0db9738d6b5fa8d89211446"></a>uint32_t</td>
<td class="fieldname">
event_dcd: 1</td>
<td class="fielddoc">
Signal DCD change event: <a class="el" href="group__USART__events.html#ga1628b951feba1c851f424ce89da409a4">ARM_USART_EVENT_DCD</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab55f90aec5f909ff3a75bf36e61312ea"></a>uint32_t</td>
<td class="fieldname">
event_ri: 1</td>
<td class="fielddoc">
Signal RI change event: <a class="el" href="group__USART__events.html#gac17fe5723d4c5923656dadd9d1302154">ARM_USART_EVENT_RI</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 11</td>
<td class="fielddoc">
Reserved (must be zero) </td></tr>
</table>

</div>
</div>
<a name="structARM__USART__STATUS" id="structARM__USART__STATUS"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_USART_STATUS</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>USART Status. </p>
<p>Structure with information about the status of the USART. The data fields encode busy flags and error flags.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2c6d2b67fba3f3e084e96a6bc7fcac6b"></a>uint32_t</td>
<td class="fieldname">
tx_busy: 1</td>
<td class="fielddoc">
Transmitter busy flag. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a9f5baee58ed41b382628a82a0b1cbcb4"></a>uint32_t</td>
<td class="fieldname">
rx_busy: 1</td>
<td class="fielddoc">
Receiver busy flag. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a048f45e9d2257a21821f81d9edd17b72"></a>uint32_t</td>
<td class="fieldname">
tx_underflow: 1</td>
<td class="fielddoc">
Transmit data underflow detected (cleared on start of next send operation) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ac403aefd9bce8b0172e1996c0f3dd8aa"></a>uint32_t</td>
<td class="fieldname">
rx_overflow: 1</td>
<td class="fielddoc">
Receive data overflow detected (cleared on start of next receive operation) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa5e3fa74f444688f9e727ffc1e988e5d"></a>uint32_t</td>
<td class="fieldname">
rx_break: 1</td>
<td class="fielddoc">
Break detected on receive (cleared on start of next receive operation) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af1d1cfd8b231843d5cc23e6a2b1ca8d0"></a>uint32_t</td>
<td class="fieldname">
rx_framing_error: 1</td>
<td class="fielddoc">
Framing error detected on receive (cleared on start of next receive operation) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="affb21b610e2d0d71727702441c238f4f"></a>uint32_t</td>
<td class="fieldname">
rx_parity_error: 1</td>
<td class="fielddoc">
Parity error detected on receive (cleared on start of next receive operation) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 25</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<a name="structARM__USART__MODEM__STATUS" id="structARM__USART__MODEM__STATUS"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_USART_MODEM_STATUS</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>USART Modem Status. </p>
<p>Structure with information about the status of modem lines. The data fields encode states of modem status lines.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__usart__interface__gr.html#ga198af0d6a7c85b7c0b96f3d9db8c34e0">ARM_USART_GetModemStatus</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a0a4ccfb729b3a40a5fd611021268c262"></a>uint32_t</td>
<td class="fieldname">
cts: 1</td>
<td class="fielddoc">
CTS state: 1=Active, 0=Inactive. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a437895b17519a16f920ae07461dd67d2"></a>uint32_t</td>
<td class="fieldname">
dsr: 1</td>
<td class="fielddoc">
DSR state: 1=Active, 0=Inactive. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa56a9ad6e266df78157f0e04feb4b78c"></a>uint32_t</td>
<td class="fieldname">
dcd: 1</td>
<td class="fielddoc">
DCD state: 1=Active, 0=Inactive. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa6cf03b82235bedc0acf00acb46130fb"></a>uint32_t</td>
<td class="fieldname">
ri: 1</td>
<td class="fielddoc">
RI state: 1=Active, 0=Inactive. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 28</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gaa578c3829eea207e9e48df6cb6f038a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ARM_USART_SignalEvent_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> : Signal USART Event. </p>
<p>Provides the typedef for the callback function <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__usart__interface__gr.html#ga51f06805e9a6197c553fa9513ac7b9d6">ARM_USART_Initialize</a> </li>
</ul>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga7b89d709f048b6a956aa211f63e75f6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>USART Modem Control. </p>
<p>Specifies values for controlling the modem control lines.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__usart__interface__gr.html#gad8eb0eb1d1c24fc725584ab93214cfc7">ARM_USART_SetModemControl</a> </li>
</ul>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ga7b89d709f048b6a956aa211f63e75f6fab4d04e682d04f70c6aeba130656d3ec6"></a>ARM_USART_RTS_CLEAR</em>&#160;</td><td class="fielddoc">
<p>Deactivate RTS. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ga7b89d709f048b6a956aa211f63e75f6fa7f9d445e6e56642c4c4251a00bfa7434"></a>ARM_USART_RTS_SET</em>&#160;</td><td class="fielddoc">
<p>Activate RTS. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ga7b89d709f048b6a956aa211f63e75f6fa3ad44ce9f16c136ccad45c09ec65cb4c"></a>ARM_USART_DTR_CLEAR</em>&#160;</td><td class="fielddoc">
<p>Deactivate DTR. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ga7b89d709f048b6a956aa211f63e75f6fab938a21e1b59a2b92424e2521b9469d4"></a>ARM_USART_DTR_SET</em>&#160;</td><td class="fielddoc">
<p>Activate DTR. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gabca6151cef47565832decaf484781b61"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a> ARM_USART_GetVersion </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get driver version. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></dd></dl>
<p>The function <b>ARM_USART_GetVersion</b> returns version information of the driver implementation in <a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></p>
<ul>
<li>API version is the version of the CMSIS-Driver specification used to implement this driver.</li>
<li>Driver version is source code version of the actual driver implementation.</li>
</ul>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> Driver_USART0;</div>
<div class="line"><a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> *drv_info;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> setup_usart (<span class="keywordtype">void</span>)  {</div>
<div class="line">  <a class="code" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>  version;</div>
<div class="line"> </div>
<div class="line">  drv_info = &amp;Driver_USART0;  </div>
<div class="line">  version = drv_info-&gt;<a class="code" href="group__usart__interface__gr.html#a8834b281da48583845c044a81566c1b3">GetVersion</a> ();</div>
<div class="line">  <span class="keywordflow">if</span> (version.<a class="code" href="group__common__drv__gr.html#ad180da20fbde1d3dafc074af87c19540">api</a> &lt; 0x10A)  {      <span class="comment">// requires at minimum API version 1.10 or higher</span></div>
<div class="line">    <span class="comment">// error handling</span></div>
<div class="line">    <span class="keywordflow">return</span>;</div>
<div class="line">  }</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gad2d3ace1fe7627bb72945efefaeddf0a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a> ARM_USART_GetCapabilities </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get driver capabilities. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a></dd></dl>
<p>The function <b>ARM_USART_GetCapabilities</b> returns information about capabilities in this driver implementation. The data fields of the structure <a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a> encode various capabilities, for example supported modes, if a hardware is capable to create signal events using the <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> callback function ...</p>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> Driver_USART0;</div>
<div class="line"><a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> *drv_info;</div>
<div class="line">  </div>
<div class="line"><span class="keywordtype">void</span> read_capabilities (<span class="keywordtype">void</span>)  {</div>
<div class="line">  <a class="code" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a> drv_capabilities;</div>
<div class="line"> </div>
<div class="line">  drv_info = &amp;Driver_USART0;  </div>
<div class="line">  drv_capabilities = drv_info-&gt;<a class="code" href="group__usart__interface__gr.html#a9cec078ea816ece7b2d989f35caadb12">GetCapabilities</a> ();</div>
<div class="line">  <span class="comment">// interrogate capabilities</span></div>
<div class="line"> </div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga51f06805e9a6197c553fa9513ac7b9d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_Initialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__usart__interface__gr.html#gaa578c3829eea207e9e48df6cb6f038a1">ARM_USART_SignalEvent_t</a>&#160;</td>
          <td class="paramname"><em>cb_event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize USART Interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cb_event</td><td>Pointer to <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_USART_Initialize</b> initializes the USART interface. It is called when the middleware component starts operation.</p>
<p>The function performs the following operations:</p>
<ul>
<li>Initializes the resources needed for the USART interface.</li>
<li>Registers the <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> callback function.</li>
</ul>
<p>The parameter <em>cb_event</em> is a pointer to the <a class="el" href="group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf">ARM_USART_SignalEvent</a> callback function; use a NULL pointer when no callback signals are required.</p>
<p><b>Example:</b> </p>
<ul>
<li>see <a class="el" href="group__usart__interface__gr.html">USART Interface</a> - Driver Functions </li>
</ul>

</div>
</div>
<a class="anchor" id="ga96f31f07a6721cf75de2a7a0ab723d26"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_Uninitialize </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialize USART Interface. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_USART_Uninitialize</b> de-initializes the resources of USART interface.</p>
<p>It is called when the middleware component stops operation and releases the software resources used by the interface. </p>

</div>
</div>
<a class="anchor" id="ga9bad012b28d544f3eeeea9c2f71a4086"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_PowerControl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control USART Interface Power. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">state</td><td>Power state </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_USART_PowerControl</b> operates the power modes of the USART interface.</p>
<p>The parameter <em>state</em> sets the operation and can have the following values:</p>
<ul>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a> : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA. Can be called multiple times. If the peripheral is already in this mode the function performs no operation and returns with <a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>.</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5a9ef9e57cbcc948d0e22314e73dc8c434">ARM_POWER_LOW</a> : may use power saving. Returns <a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> when not implemented.</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35">ARM_POWER_OFF</a> : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.</li>
</ul>
<p>Refer to <a class="el" href="theoryOperation.html#CallSequence">Function Call Sequence</a> for more information. </p>

</div>
</div>
<a class="anchor" id="ga5cf758b0b9d03dca68846962f73c0b08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_Send </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start sending data to USART transmitter. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Pointer to buffer with data to send to USART transmitter </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>Number of data items to send </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>This functions <b>ARM_USART_Send</b> is used in asynchronous mode to send data to the USART transmitter. It can also be used in synchronous mode when sending data only (received data is ignored).</p>
<p>Transmitter needs to be enabled by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#gad96ea1a80c97f968fbc0ae4c20e7fa6a">ARM_USART_CONTROL_TX</a> as the control parameter and <span class="XML-Token">1</span> as argument.</p>
<p>The function parameters specify the buffer with data and the number of items to send. The item size is defined by the data type which depends on the configured number of data bits.</p>
<p>Data type is:</p>
<ul>
<li><em>uint8_t</em> when configured for 5..8 data bits</li>
<li><em>uint16_t</em> when configured for 9 data bits</li>
</ul>
<p>Calling the function <b>ARM_USART_Send</b> only starts the send operation. The function is non-blocking and returns as soon as the driver has started the operation (driver typically configures DMA or the interrupt system for continuous transfer). When in synchronous slave mode the operation is only registered and started when the master starts the transfer. During the operation it is not allowed to call this function again or any other data transfer function when in synchronous mode. Also the data buffer must stay allocated and the contents of unsent data must not be modified. When send operation is completed (requested number of items sent) the <a class="el" href="group__USART__events.html#gaae1c626192b16ccace93f3546e7884bf">ARM_USART_EVENT_SEND_COMPLETE</a> event is generated. Progress of send operation can also be monitored by reading the number of items already sent by calling <a class="el" href="group__usart__interface__gr.html#gacb355584bcdf4ebd36f11d945800fa03">ARM_USART_GetTxCount</a>.</p>
<p>After send operation has completed there might still be some data left in the driver's hardware buffer which is still being transmitted. When all data has been physically transmitted the <a class="el" href="group__USART__events.html#ga12872a3b04343f97d9535b5b0d37286d">ARM_USART_EVENT_TX_COMPLETE</a> event is generated (if supported and reported by <em>event_tx_complete</em> in <a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a>). At that point also the <em>tx_busy</em> data field in <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a> is cleared.</p>
<p>Status of the transmitter can be monitored by calling the <a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> and checking the <em>tx_busy</em> flag which indicates if transmission is still in progress.</p>
<p>When in synchronous slave mode and transmitter is enabled but send/receive/transfer operation is not started and data is requested by the master then the <a class="el" href="group__USART__events.html#gae57b9977bd338bf8bef86978843fa443">ARM_USART_EVENT_TX_UNDERFLOW</a> event is generated.</p>
<p>Send operation can be aborted by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#ga54e88b32bc7368ff9c44613eae735c44">ARM_USART_ABORT_SEND</a> as the control parameter. </p>

</div>
</div>
<a class="anchor" id="gae9efabdabb5aaa17bce83339f8a58803"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_Receive </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start receiving data from USART receiver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Pointer to buffer for data to receive from USART receiver </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>Number of data items to receive </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>This functions <b>ARM_USART_Receive</b> is used in asynchronous mode to receive data from the USART receiver. It can also be used in synchronous mode when receiving data only (transmits the default value as specified by <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#gacd6f060afd55ffa1422567c31ebad950">ARM_USART_SET_DEFAULT_TX_VALUE</a> as control parameter).</p>
<p>Receiver needs to be enabled by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#gad52c08553ae203d4f7741404589b8169">ARM_USART_CONTROL_RX</a> as the control parameter and <span class="XML-Token">1</span> as argument.</p>
<p>The function parameters specify the buffer for data and the number of items to receive. The item size is defined by the data type which depends on the configured number of data bits.</p>
<p>Data type is:</p>
<ul>
<li><em>uint8_t</em> when configured for 5..8 data bits</li>
<li><em>uint16_t</em> when configured for 9 data bits</li>
</ul>
<p>Calling the function <b>ARM_USART_Receive</b> only starts the receive operation. The function is non-blocking and returns as soon as the driver has started the operation (driver typically configures DMA or the interrupt system for continuous transfer). When in synchronous slave mode the operation is only registered and started when the master starts the transfer. During the operation it is not allowed to call this function again or any other data transfer function when in synchronous mode. Also the data buffer must stay allocated. When receive operation is completed (requested number of items received) the <a class="el" href="group__USART__events.html#ga08b165fd8525e44e3ce42ed6183cd30a">ARM_USART_EVENT_RECEIVE_COMPLETE</a> event is generated. Progress of receive operation can also be monitored by reading the number of items already received by calling <a class="el" href="group__usart__interface__gr.html#ga1a8799aeeba1363a9e5d22bada715a29">ARM_USART_GetRxCount</a>.</p>
<p>Status of the receiver can be monitored by calling the <a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> and checking the <em>rx_busy</em> flag which indicates if reception is still in progress.</p>
<p>During reception the following events can be generated (in asynchronous mode):</p>
<ul>
<li><a class="el" href="group__USART__events.html#ga66ee2256571450a3fc3c530344ea9bd7">ARM_USART_EVENT_RX_TIMEOUT</a> : Receive timeout between consecutive characters detected (optional)</li>
<li><a class="el" href="group__USART__events.html#gaa1d19e48faf2bdc2a976de448928288e">ARM_USART_EVENT_RX_BREAK</a> : Break detected (Framing error is not generated for Break condition)</li>
<li><a class="el" href="group__USART__events.html#ga2d97495c650220fbfe9d6977d0953127">ARM_USART_EVENT_RX_FRAMING_ERROR</a> : Framing error detected</li>
<li><a class="el" href="group__USART__events.html#gadb4fec2530fc5ae3ad2b056741883451">ARM_USART_EVENT_RX_PARITY_ERROR</a> : Parity error detected</li>
<li><a class="el" href="group__USART__events.html#ga43a0869daf83abb3fea96926a97047ad">ARM_USART_EVENT_RX_OVERFLOW</a> : Data overflow detected (also in synchronous slave mode)</li>
</ul>
<p><a class="el" href="group__USART__events.html#ga43a0869daf83abb3fea96926a97047ad">ARM_USART_EVENT_RX_OVERFLOW</a> event is also generated when receiver is enabled but data is lost because receive operation in asynchronous mode or receive/send/transfer operation in synchronous slave mode has not been started.</p>
<p>Receive operation can be aborted by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#ga3f57bcedf610dc844e6cc3a230dba5f7">ARM_USART_ABORT_RECEIVE</a> as the control parameter. </p>

</div>
</div>
<a class="anchor" id="ga878899928d34a818edd3e97d67b65c2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_Transfer </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data_out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start sending/receiving data to/from USART transmitter/receiver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data_out</td><td>Pointer to buffer with data to send to USART transmitter </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data_in</td><td>Pointer to buffer for data to receive from USART receiver </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>Number of data items to transfer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>This functions <b>ARM_USART_Transfer</b> is used in synchronous mode to transfer data via USART. It synchronously sends data to the USART transmitter and receives data from the USART receiver.</p>
<p>Transmitter needs to be enabled by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#gad96ea1a80c97f968fbc0ae4c20e7fa6a">ARM_USART_CONTROL_TX</a> as the control parameter and <span class="XML-Token">1</span> as argument. Receiver needs to be enabled by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#gad52c08553ae203d4f7741404589b8169">ARM_USART_CONTROL_RX</a> as the control parameter and <span class="XML-Token">1</span> as argument.</p>
<p>The function parameters specify the buffer with data to send, the buffer for data to receive and the number of items to transfer. The item size is defined by the data type which depends on the configured number of data bits.</p>
<p>Data type is:</p>
<ul>
<li><em>uint8_t</em> when configured for 5..8 data bits</li>
<li><em>uint16_t</em> when configured for 9 data bits</li>
</ul>
<p>Calling the function <b>ARM_USART_Transfer</b> only starts the transfer operation. The function is non-blocking and returns as soon as the driver has started the operation (driver typically configures DMA or the interrupt system for continuous transfer). When in synchronous slave mode the operation is only registered and started when the master starts the transfer. During the operation it is not allowed to call this function or any other data transfer function again. Also the data buffers must stay allocated and the contents of unsent data must not be modified. When transfer operation is completed (requested number of items transferred) the <a class="el" href="group__USART__events.html#ga0599793e6aa531d56ff9f81ff12605d7">ARM_USART_EVENT_TRANSFER_COMPLETE</a> event is generated. Progress of transfer operation can also be monitored by reading the number of items already transferred by calling <a class="el" href="group__usart__interface__gr.html#gacb355584bcdf4ebd36f11d945800fa03">ARM_USART_GetTxCount</a> or <a class="el" href="group__usart__interface__gr.html#ga1a8799aeeba1363a9e5d22bada715a29">ARM_USART_GetRxCount</a>.</p>
<p>Status of the transmitter or receiver can be monitored by calling the <a class="el" href="group__usart__interface__gr.html#ga1e8fdd54294b587438b2b72f4dbde004">ARM_USART_GetStatus</a> and checking the <em>tx_busy</em> or <em>rx_busy</em> flag.</p>
<p>When in synchronous slave mode also the following events can be generated:</p>
<ul>
<li><a class="el" href="group__USART__events.html#gae57b9977bd338bf8bef86978843fa443">ARM_USART_EVENT_TX_UNDERFLOW</a> : transmitter is enabled but transfer operation is not started and data is requested by the master</li>
<li><a class="el" href="group__USART__events.html#ga43a0869daf83abb3fea96926a97047ad">ARM_USART_EVENT_RX_OVERFLOW</a> : data lost during transfer or because receiver is enabled but transfer operation has not been started</li>
</ul>
<p>Transfer operation can also be aborted by calling <a class="el" href="group__usart__interface__gr.html#gad8ffdde2123b5412de3005c456da677d">ARM_USART_Control</a> with <a class="el" href="group__usart__misc__control.html#ga83d0ef402feb342f9939f0e4ffe26182">ARM_USART_ABORT_TRANSFER</a> as the control parameter. </p>

</div>
</div>
<a class="anchor" id="gacb355584bcdf4ebd36f11d945800fa03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ARM_USART_GetTxCount </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get transmitted data count. </p>
<dl class="section return"><dt>Returns</dt><dd>number of data items transmitted</dd></dl>
<p>The function <b>ARM_USART_GetTxCount</b> returns the number of the currently transmitted data items during <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a> and <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> operation. </p>

</div>
</div>
<a class="anchor" id="ga1a8799aeeba1363a9e5d22bada715a29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ARM_USART_GetRxCount </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get received data count. </p>
<dl class="section return"><dt>Returns</dt><dd>number of data items received</dd></dl>
<p>The function <b>ARM_USART_GetRxCount</b> returns the number of the currently received data items during <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a> and <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> operation. </p>

</div>
</div>
<a class="anchor" id="gad8ffdde2123b5412de3005c456da677d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_Control </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>control</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control USART Interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>Operation </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument of operation (optional) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>common <a class="el" href="group__execution__status.html">Status Error Codes</a> and driver specific <a class="el" href="group__usart__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_USART_Control</b> control the USART interface settings and execute various operations.</p>
<p>The parameter <em>control</em> sets the operation and is explained in the table below. Values from different categories can be ORed with the exception of <a class="el" href="group__usart__interface__gr.html#usart_misc_tab">Miscellaneous Operations</a>.</p>
<p>The parameter <em>arg</em> provides, depending on the operation, additional information, for example the baudrate.</p>
<p>The table lists the available <em>control</em> operations.</p>
<table  class="cmtable">
<tr>
<th>Parameter <em>control</em>  </th><th style="text-align:right">Bit  </th><th>Category  </th><th>Description  </th></tr>
<tr>
<td><a class="el" href="group__usart__mode__control.html#gad85039731478c924d3b418ec00768388">ARM_USART_MODE_ASYNCHRONOUS</a> </td><td rowspan="6" style="text-align:right">0..7  </td><td rowspan="6">Operation Mode </td><td>Set to asynchronous UART mode. <em>arg</em> specifies baudrate. </td></tr>
<tr>
<td><a class="el" href="group__usart__mode__control.html#ga7d3e9e0e838a3f15f8661983b9ac4573">ARM_USART_MODE_SYNCHRONOUS_MASTER</a> </td><td>Set to synchronous master mode with clock signal generation. <em>arg</em> specifies baudrate. </td></tr>
<tr>
<td><a class="el" href="group__usart__mode__control.html#gae78778475f3fab09a080c2279afc69fa">ARM_USART_MODE_SYNCHRONOUS_SLAVE</a> </td><td>Set to synchronous slave mode with external clock signal. </td></tr>
<tr>
<td><a class="el" href="group__usart__mode__control.html#ga4132136971d4f93f2e6a87c6775a9bb0">ARM_USART_MODE_SINGLE_WIRE</a> </td><td>Set to single-wire (half-duplex) mode. <em>arg</em> specifies baudrate. </td></tr>
<tr>
<td><a class="el" href="group__usart__mode__control.html#ga458f4f60d1d772cfd7567ae424d9aad9">ARM_USART_MODE_IRDA</a> </td><td>Set to Infra-red data mode. <em>arg</em> specifies baudrate. </td></tr>
<tr>
<td><a class="el" href="group__usart__mode__control.html#gade65a1c27d9097d9ef0e86c02b55cecd">ARM_USART_MODE_SMART_CARD</a> </td><td>Set to Smart Card mode. <em>arg</em> specifies baudrate. </td></tr>
<tr>
<td><a class="el" href="group__usart__data__bits.html#ga981ff25b4ff806f743d1af4575b87339">ARM_USART_DATA_BITS_5</a> </td><td rowspan="5" style="text-align:right">8..11  </td><td rowspan="5">Data Bits </td><td>Set to <span class="XML-Token">5</span> data bits </td></tr>
<tr>
<td><a class="el" href="group__usart__data__bits.html#ga92ba3d6cea5cd5c0b661667539a9e43c">ARM_USART_DATA_BITS_6</a> </td><td>Set to <span class="XML-Token">6</span> data bits </td></tr>
<tr>
<td><a class="el" href="group__usart__data__bits.html#gad86a2d971ce521c6f6eda28d4f8786a4">ARM_USART_DATA_BITS_7</a> </td><td>Set to <span class="XML-Token">7</span> data bits </td></tr>
<tr>
<td><a class="el" href="group__usart__data__bits.html#gadc5e8d17b5c69cd7f9135b849c2a4586">ARM_USART_DATA_BITS_8</a> </td><td>Set to <span class="XML-Token">8</span> data bits (default) </td></tr>
<tr>
<td><a class="el" href="group__usart__data__bits.html#gae238a08198dc7ac6178ae0a2a95a2764">ARM_USART_DATA_BITS_9</a> </td><td>Set to <span class="XML-Token">9</span> data bits </td></tr>
<tr>
<td><a class="el" href="group__usart__parity__bit.html#gabc35e8dd2cbebb730abf36959e87a207">ARM_USART_PARITY_EVEN</a> </td><td rowspan="3" style="text-align:right">12..13  </td><td rowspan="3">Parity Bit </td><td>Set to Even Parity </td></tr>
<tr>
<td><a class="el" href="group__usart__parity__bit.html#ga141a64650f99a1f642c3b3b6ced0eb8d">ARM_USART_PARITY_NONE</a> </td><td>Set to No Parity (default) </td></tr>
<tr>
<td><a class="el" href="group__usart__parity__bit.html#ga02f30181eedd3b04d650dd507bf40d6d">ARM_USART_PARITY_ODD</a> </td><td>Set to Odd Parity </td></tr>
<tr>
<td><a class="el" href="group__usart__stop__bits.html#ga45f51a51e654b4753a538ed33f0d7d78">ARM_USART_STOP_BITS_1</a> </td><td rowspan="4" style="text-align:right">14..15  </td><td rowspan="4">Stop Bit </td><td>Set to <span class="XML-Token">1</span> Stop bit (default) </td></tr>
<tr>
<td><a class="el" href="group__usart__stop__bits.html#ga17f034b5f0d0328dc636b403d1954795">ARM_USART_STOP_BITS_2</a> </td><td>Set to <span class="XML-Token">2</span> Stop bits </td></tr>
<tr>
<td><a class="el" href="group__usart__stop__bits.html#gafc1d0f2c95a76ef4c5152792a619f136">ARM_USART_STOP_BITS_1_5</a> </td><td>Set to <span class="XML-Token">1.5</span> Stop bits </td></tr>
<tr>
<td><a class="el" href="group__usart__stop__bits.html#ga47f43cb83d9955a4c90d918acaaa44ba">ARM_USART_STOP_BITS_0_5</a> </td><td>Set to <span class="XML-Token">0.5</span> Stop bits </td></tr>
<tr>
<td><a class="el" href="group__usart__flow__control.html#gad04aa3fe4ea4b7363aee4bdca2ed3764">ARM_USART_FLOW_CONTROL_NONE</a> </td><td rowspan="4" style="text-align:right">16..17  </td><td rowspan="4">Flow Control </td><td>No flow control signal (default) </td></tr>
<tr>
<td><a class="el" href="group__usart__flow__control.html#gaa7b38ebff1ce0f5c3e4479d22e66715f">ARM_USART_FLOW_CONTROL_CTS</a> </td><td>Set to use the CTS flow control signal </td></tr>
<tr>
<td><a class="el" href="group__usart__flow__control.html#ga80c8a78e8868165cfcc543105bfd9621">ARM_USART_FLOW_CONTROL_RTS</a> </td><td>Set to use the RTS flow control signal </td></tr>
<tr>
<td><a class="el" href="group__usart__flow__control.html#gab16151b5c376b41586faf033f4a42d02">ARM_USART_FLOW_CONTROL_RTS_CTS</a> </td><td>Set to use the RTS and CTS flow control signal </td></tr>
<tr>
<td><a class="el" href="group__usart__clock__polarity.html#ga472d459abb99f1caaff94fa0cdd2ad27">ARM_USART_CPOL0</a> </td><td rowspan="2" style="text-align:right">18  </td><td rowspan="2">Clock Polarity </td><td>CPOL=<span class="XML-Token">0</span> (default) : data are captured on rising edge (low-&gt;high transition) </td></tr>
<tr>
<td><a class="el" href="group__usart__clock__polarity.html#ga9e5541d8937a9d92e42aeb273138592a">ARM_USART_CPOL1</a> </td><td>CPOL=<span class="XML-Token">1</span> : data are captured on falling edge (high-&gt;lowh transition) </td></tr>
<tr>
<td><a class="el" href="group__usart__clock__phase.html#ga5eb27c2294b7d14a20d0c7e2ef0a47b4">ARM_USART_CPHA0</a> </td><td rowspan="2" style="text-align:right">19  </td><td rowspan="2">Clock Phase </td><td>CPHA=<span class="XML-Token">0</span> (default) : sample on first (leading) edge </td></tr>
<tr>
<td><a class="el" href="group__usart__clock__phase.html#ga4b9f16371870476739a198c52dba6862">ARM_USART_CPHA1</a> </td><td>CPHA=<span class="XML-Token">1</span> : sample on second (trailing) edge </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#ga3f57bcedf610dc844e6cc3a230dba5f7">ARM_USART_ABORT_RECEIVE</a> </td><td rowspan="11" style="text-align:right">0..19  </td><td rowspan="11"><a class="anchor" id="usart_misc_tab"></a>Miscellaneous Operations <br/>
(cannot be ORed) </td><td>Abort receive operation (see also: <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a>) </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#ga54e88b32bc7368ff9c44613eae735c44">ARM_USART_ABORT_SEND</a> </td><td>Abort send operation (see also: <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a>) </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#ga83d0ef402feb342f9939f0e4ffe26182">ARM_USART_ABORT_TRANSFER</a> </td><td>Abort transfer operation (see also: <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a>) </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#gab194a6f916e5b25e0262534c0cce54dc">ARM_USART_CONTROL_BREAK</a> </td><td>Enable or disable continuous Break transmission; <em>arg</em> : <span class="XML-Token">0=disabled; 1=enabled</span> </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#gad52c08553ae203d4f7741404589b8169">ARM_USART_CONTROL_RX</a> </td><td>Enable or disable receiver; <em>arg</em> : <span class="XML-Token">0=disabled; 1=enabled</span> (see also: <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a>; <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a>) </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#ga4bb5374e7db308b6ff48aa13aa9c4b8a">ARM_USART_CONTROL_SMART_CARD_NACK</a> </td><td>Enable or disable Smart Card NACK generation; <em>arg</em> : <span class="XML-Token">0=disabled; 1=enabled</span> </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#gad96ea1a80c97f968fbc0ae4c20e7fa6a">ARM_USART_CONTROL_TX</a> </td><td>Enable or disable transmitter; <em>arg</em> : <span class="XML-Token">0=disabled; 1=enabled</span> (see also: <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a>; <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a>) </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#gacd6f060afd55ffa1422567c31ebad950">ARM_USART_SET_DEFAULT_TX_VALUE</a> </td><td>Set the default transmit value (synchronous receive only); <em>arg</em> specifies the value. (see also: <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a>) </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#gab8565d1f26382e832327e4553d18eb02">ARM_USART_SET_IRDA_PULSE</a> </td><td>Set the IrDA pulse value in <span class="XML-Token">ns</span>; <em>arg</em> : <span class="XML-Token">0=3/16 of bit period</span> </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#ga79698a2bd564c1f5bb1829ea422e9d3d">ARM_USART_SET_SMART_CARD_CLOCK</a> </td><td>Set the Smart Card Clock in <span class="XML-Token">Hz</span>; <em>arg</em> : <span class="XML-Token">0=Clock not set</span> </td></tr>
<tr>
<td><a class="el" href="group__usart__misc__control.html#ga169be809adc186c131bb8b1618005b28">ARM_USART_SET_SMART_CARD_GUARD_TIME</a> </td><td>Set the Smart Card guard time; <em>arg</em> = number of bit periods </td></tr>
</table>
<p><b>Example</b> </p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__usart__interface__gr.html#structARM__DRIVER__USART">ARM_DRIVER_USART</a> Driver_USART0;</div>
<div class="line"></div>
<div class="line"><span class="comment">// configure to UART mode: 8 bits, no parity, 1 stop bit, no flow control, 9600 bps</span></div>
<div class="line">status = Driver_USART0.<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__usart__mode__control.html#gad85039731478c924d3b418ec00768388">ARM_USART_MODE_ASYNCHRONOUS</a> | </div>
<div class="line">                               <a class="code" href="group__usart__data__bits.html#gadc5e8d17b5c69cd7f9135b849c2a4586">ARM_USART_DATA_BITS_8</a> | </div>
<div class="line">                               <a class="code" href="group__usart__parity__bit.html#ga141a64650f99a1f642c3b3b6ced0eb8d">ARM_USART_PARITY_NONE</a> | </div>
<div class="line">                               <a class="code" href="group__usart__stop__bits.html#ga45f51a51e654b4753a538ed33f0d7d78">ARM_USART_STOP_BITS_1</a> | </div>
<div class="line">                               <a class="code" href="group__usart__flow__control.html#gad04aa3fe4ea4b7363aee4bdca2ed3764">ARM_USART_FLOW_CONTROL_NONE</a>, 9600);</div>
<div class="line"></div>
<div class="line"><span class="comment">// identical with above settings (default settings removed)</span></div>
<div class="line"><span class="comment">// configure to UART mode: 8 bits, no parity, 1 stop bit, flow control, 9600 bps</span></div>
<div class="line">status = Driver_USART0.<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__usart__mode__control.html#gad85039731478c924d3b418ec00768388">ARM_USART_MODE_ASYNCHRONOUS</a>, 9600);</div>
<div class="line"></div>
<div class="line"><span class="comment">// enable TX output</span></div>
<div class="line">status = Driver_USART0.<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__usart__misc__control.html#gad96ea1a80c97f968fbc0ae4c20e7fa6a">ARM_USART_CONTROL_TX</a>, 1);</div>
<div class="line"></div>
<div class="line"><span class="comment">// disable RX output</span></div>
<div class="line">status = Driver_USART0.<a class="code" href="group__usart__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__usart__misc__control.html#gad52c08553ae203d4f7741404589b8169">ARM_USART_CONTROL_RX</a>, 0);</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga1e8fdd54294b587438b2b72f4dbde004"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a> ARM_USART_GetStatus </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get USART status. </p>
<dl class="section return"><dt>Returns</dt><dd>USART status <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a></dd></dl>
<p>The function <b>ARM_USART_GetStatus</b> retrieves the current USART interface status. </p>

</div>
</div>
<a class="anchor" id="gad8eb0eb1d1c24fc725584ab93214cfc7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USART_SetModemControl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a>&#160;</td>
          <td class="paramname"><em>control</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set USART Modem Control line state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">control</td><td><a class="el" href="group__usart__interface__gr.html#ga7b89d709f048b6a956aa211f63e75f6f">ARM_USART_MODEM_CONTROL</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_USART_SetModemControl</b> activates or deactivates the selected USART modem control line.</p>
<p>The function <a class="el" href="group__usart__interface__gr.html#ga198af0d6a7c85b7c0b96f3d9db8c34e0">ARM_USART_GetModemStatus</a> returns information about status of the modem lines. </p>

</div>
</div>
<a class="anchor" id="ga198af0d6a7c85b7c0b96f3d9db8c34e0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a> ARM_USART_GetModemStatus </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get USART Modem Status lines state. </p>
<dl class="section return"><dt>Returns</dt><dd>modem status <a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a></dd></dl>
<p>The function <b>ARM_USART_GetModemStatus</b> returns the current USART Modem Status lines state.</p>
<p>The function <a class="el" href="group__usart__interface__gr.html#gad8eb0eb1d1c24fc725584ab93214cfc7">ARM_USART_SetModemControl</a> sets the modem control lines of the USART. </p>

</div>
</div>
<a class="anchor" id="gad796cd023f8f6300a6caadcc39d43cbf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ARM_USART_SignalEvent </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Signal USART Events. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td><a class="el" href="group__USART__events.html">USART Events</a> notification mask </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<p>The function <b>ARM_USART_SignalEvent</b> is a callback function registered by the function <a class="el" href="group__usart__interface__gr.html#ga51f06805e9a6197c553fa9513ac7b9d6">ARM_USART_Initialize</a>.</p>
<p>The parameter <em>event</em> indicates one or more events that occurred during driver operation. Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.</p>
<p>Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the data fields of the structure <a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES">ARM_USART_CAPABILITIES</a>, which can be retrieved with the function <a class="el" href="group__usart__interface__gr.html#gad2d3ace1fe7627bb72945efefaeddf0a">ARM_USART_GetCapabilities</a>.</p>
<p>The following events can be generated:</p>
<table  class="cmtable">
<tr>
<th>Parameter <em>event</em> </th><th>Bit </th><th>Description  </th><th>supported when <a class="el" href="group__usart__interface__gr.html#structARM__USART__CAPABILITIES" title="USART Device Driver Capabilities. ">ARM_USART_CAPABILITIES</a>   </th></tr>
<tr>
<td><a class="el" href="group__USART__events.html#gaae1c626192b16ccace93f3546e7884bf">ARM_USART_EVENT_SEND_COMPLETE</a> </td><td>0 </td><td>Occurs after call to <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a> to indicate that all the data to be sent was processed by the driver. All the data might have been already transmitted or parts of it are still queued in transmit buffers. The driver is ready for the next call to <a class="el" href="group__usart__interface__gr.html#ga5cf758b0b9d03dca68846962f73c0b08">ARM_USART_Send</a>; however USART may still transmit data.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#ga08b165fd8525e44e3ce42ed6183cd30a">ARM_USART_EVENT_RECEIVE_COMPLETE</a> </td><td>1 </td><td>Occurs after call to <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a> to indicate that all the data has been received. The driver is ready for the next call to <a class="el" href="group__usart__interface__gr.html#gae9efabdabb5aaa17bce83339f8a58803">ARM_USART_Receive</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#ga0599793e6aa531d56ff9f81ff12605d7">ARM_USART_EVENT_TRANSFER_COMPLETE</a> </td><td>2 </td><td>Occurs after call to <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> to indicate that all the data has been transferred. The driver is ready for the next call to <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#ga12872a3b04343f97d9535b5b0d37286d">ARM_USART_EVENT_TX_COMPLETE</a> </td><td>3 </td><td>Occurs after call to <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a> to indicate that all the data has been transferred. The driver is ready for the next call to <a class="el" href="group__usart__interface__gr.html#ga878899928d34a818edd3e97d67b65c2a">ARM_USART_Transfer</a>.  </td><td>data field <em>event_tx_complete</em> = <span class="XML-Token">1</span>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#gae57b9977bd338bf8bef86978843fa443">ARM_USART_EVENT_TX_UNDERFLOW</a> </td><td>4 </td><td>Occurs in synchronous slave mode when data is requested by the master but send/receive/transfer operation has not been started. Data field <em>rx_underflow</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#ga43a0869daf83abb3fea96926a97047ad">ARM_USART_EVENT_RX_OVERFLOW</a> </td><td>5 </td><td>Occurs when data is lost during receive/transfer operation or when data is lost because receive operation in asynchronous mode or receive/send/transfer operation in synchronous slave mode has not been started. Data field <em>rx_overflow</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td>ARM_USART_EVENT_RX_TIMEOUT </td><td>6 </td><td>Occurs during receive when idle time is detected between consecutive characters (idle time is hardware dependent). </td><td>data field <em>event_rx_timeout</em> = <span class="XML-Token">1</span>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#gaa1d19e48faf2bdc2a976de448928288e">ARM_USART_EVENT_RX_BREAK</a> </td><td>7 </td><td>Occurs when break is detected during receive. Data field <em>rx_break</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#ga2d97495c650220fbfe9d6977d0953127">ARM_USART_EVENT_RX_FRAMING_ERROR</a> </td><td>8 </td><td>Occurs when framing error is detected during receive. Data field <em>rx_framing_error</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td><a class="el" href="group__USART__events.html#gadb4fec2530fc5ae3ad2b056741883451">ARM_USART_EVENT_RX_PARITY_ERROR</a> </td><td>9 </td><td>Occurs when parity error is detected during receive. Data field <em>rx_parity_error</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__STATUS">ARM_USART_STATUS</a>.  </td><td><em>always supported</em>   </td></tr>
<tr>
<td>ARM_USART_EVENT_CTS </td><td>10 </td><td>Indicates that CTS modem line state has changed. Data field <em>cts</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>.  </td><td>data field <em>event_cts</em> = <span class="XML-Token">1</span> and <br/>
 data field <em>cts</em> = <span class="XML-Token">1</span>   </td></tr>
<tr>
<td>ARM_USART_EVENT_CTS </td><td>11 </td><td>Indicates that DSR modem line state has changed. Data field <em>dsr</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>.  </td><td>data field <em>event_dsr</em> = <span class="XML-Token">1</span> and <br/>
 data field <em>dsr</em> = <span class="XML-Token">1</span>   </td></tr>
<tr>
<td>ARM_USART_EVENT_DCD </td><td>12 </td><td>Indicates that DCD modem line state has changed. Data field <em>dcd</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>.  </td><td>data field <em>event_dcd</em> = <span class="XML-Token">1</span> and <br/>
 data field <em>dcd</em> = <span class="XML-Token">1</span>   </td></tr>
<tr>
<td>ARM_USART_EVENT_RI </td><td>13 </td><td>Indicates that RI modem line state has changed. Data field <em>ri</em> = <span class="XML-Token">1</span> of <a class="el" href="group__usart__interface__gr.html#structARM__USART__MODEM__STATUS">ARM_USART_MODEM_STATUS</a>.  </td><td>data field <em>event_ri</em> = <span class="XML-Token">1</span> and <br/>
 data field <em>ri</em> = <span class="XML-Token">1</span>   </td></tr>
</table>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Wed Jul 10 2019 15:20:31 for CMSIS-Driver Version 2.7.1 by Arm Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 
	-->
	</li>
  </ul>
</div>
</body>
</html>
